package ym.ecrm.core.domain.marketManagement;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import javax.persistence.Entity;

import ym.ecrm.core.domain.base.BaseEntity;
import ym.ecrm.core.domain.customerManagement.Customer;
/**
 * 目标客户群类
 * @author fage
 *@version 1.0
 */
@Entity
@Table(name = "t_targetCustomersGroup")
public class TargetCustomersGroup extends BaseEntity {

	/**
	 * groupCode 目标客户群编号
	 */
	private String groupCode;
	/**
	 * name 目标客户群名称
	 */
	private String name;
	/**
	 * customers 具体客户记录
	 */
	@OneToMany(targetEntity=Customer.class
			,cascade = {CascadeType.PERSIST,CascadeType.MERGE}
			,fetch =FetchType.EAGER )
	private Set<Customer> customers = new HashSet<Customer>();
	
	public String getGroupCode() {
		return groupCode;
	}
	public void setGroupCode(String groupCode) {
		this.groupCode = groupCode;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Set<Customer> getCustomers() {
		return customers;
	}
	public void setCustomers(Set<Customer> customers) {
		this.customers = customers;
	}
	
	
}
